import request from "@/utils/request";
// 获取商品分类
const fetchCates = (params = {}) => {
  return request.get('/cateLists', {params})
}
// 新增商品分类
const addCate = (params = {}) => {
  return request.post('/addCate', params)
}
// 获取商品分类详情
const fetchCateDetail = (id: number) => {
  return request.get('/cateDetail', {params: {id}})
}
// 修改商品
const updateCate = (params = {}) => {
  return request.put('/updateCate', params)
}
// 删除商品分类
const removeCate = (id: number) => {
  return request.delete('/delCate', {
    params: {id}
  })
}
export {
  fetchCates,
  addCate,
  fetchCateDetail,
  updateCate,
  removeCate
}